﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.CApCableCursorChangeSession
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using System;
using System.Windows.Forms;


namespace DnProcessSimulateCommands;

internal class CApCableCursorChangeSession : IDisposable
{
  private readonly Cursor m_cursorToRestore;

  public CApCableCursorChangeSession(Cursor sessionCursor)
  {
    this.m_cursorToRestore = Cursor.Current;
    Cursor.Current = sessionCursor ?? throw new ArgumentNullException(nameof (sessionCursor));
  }

  public void Dispose() => Cursor.Current = this.m_cursorToRestore;
}
